<template>
  <dict-basic-form
    :mode="mode"
    :code="code"
    :titleAdd="'添加故障类型'"
    :titleEdit="'编辑故障类型'"
    :nameLabel="'故障类型'"
    :showColor="false"
    :api="dictApi"
    :disable-enabled="disableEnabled"
    @success="$emit('success')"
    @close="$emit('close')"
  />
</template>

<script>
import DictBasicForm from '@/views/components/DictBasicForm.vue'
import { getFaultType, addFaultType, updateFaultType } from '@/api/dict/faultType'

export default {
  name: 'FaultTypeForm',
  components: { DictBasicForm },
  props: { mode: { type: String, default: 'create' }, code: { type: String, default: '' }, disableEnabled: { type: Boolean, default: false } },
  computed: {
    dictApi() {
      return { get: getFaultType, add: addFaultType, update: updateFaultType }
    }
  }
}
</script>


